home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Linux Cubed Series 7: Sunsite
/
Linux Cubed Series 7 - Sunsite Vol 1.iso
/
system
/
news
/
inn-1.4-l
/
inn-1
/
inn-1.4-linux-0.1
/
bash-patches
/
bash-1.12-linux.readme
< prev
Wrap
Text File
|
1993-05-01
|
2KB
|
61 lines
Newsgroups: comp.os.linux.announce
From: jrs@world.std.com (Rick Sladkey)
Date: Sun, 2 May 1993 01:56:11 GMT
Subject: bug fix for bash-1.12 available
Keywords: bash, non-interactive, bug-fix
Summary: bug fixed where two programs can fight for input when SHELL is bash
Message-ID: <JRS.93May1215611@lepton.world.std.com>
Organization: The Internet
Lines: 50
I have uploaded a fixed version of bash-1.12 for Linux to
sunsite.unc.edu. The file for now is:
* sunsite.unc.edu:/pub/Linux/Incoming/bash-1.12-fixed.tar.z
This gzipped file contains Linux patches against bash-1.12 and a
static binary for Linux.
This distribution fixes the oft cited bug where shelling out to an
editor (emacs, elvis, vile) from any program followed by an interrupt
character causes both programs to fight for input. We get several
messages per week on comp.os.linux asking if this is a kernel bug. It
is not a kernel bug.
In fact, it is due to a buglet in bash that causes bash to die when it
is run non-interactively as the parent of a program that catches
SIGINT without exiting. For example, if you shell out to emacs from,
say, elm or trn, and type `^G' all hell breaks loose and you have to
kill both programs.
Since bash is my favorite shell, and since this is very disabling bug
for those who frequently run into it, and since we get so many bug
reports on c.o.l, I decided to take a stab at fixing it. I do not
promise my fix is elegant, complete, or even correct. But it does
work around this most common problem, seemingly without breaking
anything else.
This fix also works for other platforms than Linux where bash also
shows this bug. Until bash-1.13 comes along (which corrects this
problem) this may have to do. The fix is quite simple and is appended
here.
Rick Sladkey <jrs@world.std.com>
-----
*** orig/bash-1.12/jobs.c Fri Jan 17 16:36:11 1992
--- bash-1.12/jobs.c Sat May 1 15:00:03 1993
***************
*** 1251,1256 ****
--- 1253,1263 ----
sigset_t set;
sigemptyset (&set);
+ if (!interactive)
+ {
+ sigaddset(&set, SIGINT);
+ sigaddset(&set, SIGQUIT);
+ }
sigsuspend (&set);
#else /* SCO Unix */
struct sigaction act, oact;